<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--
@html_name: 01模块化
@description: The past cannot be redeemed, the future can be changed.
@author: Jason Black
@create: 2023/6/27 08:18:24
-->
<script type="module">
    // type="module" 表示用于模块导入
    // 通过关键字 import 引入模块
    import * as m1 from "./module01.js";
    console.log(m1)
    m1.printName("Jason")

    import * as m2 from "./module02.js";
    console.log(m2)
    m2.printName("Jason")

    import * as m3 from "./module03.js"
    console.log(m3)
    // 默认暴露方式，在访问属性时需要通过default来访问
    m3.default.printName()
</script>

</body>
</html>